{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 迁徙图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "scrolled": false
   },
   "outputs": [],
   "source": [
    "from iclientpy import viz"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "data=[\n",
    "    [[{'name':'北京'},{'name':'上海','value':95}],[{'name':'北京'},{'name':'广州','value':90}],[{'name':'北京'},{'name':'大连','value':80}],[{'name':'北京'},{'name':'南宁','value':70}],[{'name':'北京'},{'name':'南昌','value':60}],[{'name':'北京'},{'name':'拉萨','value':50}],[{'name':'北京'},{'name':'长春','value':40}],[{'name':'北京'},{'name':'包头','value':30}],[{'name':'北京'},{'name':'重庆','value':20}],[{'name':'北京'},{'name':'常州','value':10}]], \n",
    "    [[{'name':'上海'},{'name':'包头','value':95}],[{'name':'上海'},{'name':'昆明','value':90}],[{'name':'上海'},{'name':'广州','value':80}],[{'name':'上海'},{'name':'郑州','value':70}],[{'name':'上海'},{'name':'长春','value':60}],[{'name':'上海'},{'name':'重庆','value':50}],[{'name':'上海'},{'name':'长沙','value':40}],[{'name':'上海'},{'name':'北京','value':30}],[{'name':'上海'},{'name':'丹东','value':20}],[{'name':'上海'},{'name':'大连','value':10}]], \n",
    "    [[{'name':'广州'},{'name':'福州','value':95}],[{'name':'广州'},{'name':'太原','value':90}],[{'name':'广州'},{'name':'长春','value':80}],[{'name':'广州'},{'name':'重庆','value':70}],[{'name':'广州'},{'name':'西安','value':60}],[{'name':'广州'},{'name':'成都','value':50}],[{'name':'广州'},{'name':'常州','value':40}],[{'name':'广州'},{'name':'北京','value':30}],[{'name':'广州'},{'name':'北海','value':20}],[{'name':'广州'},{'name':'海口','value':10}]]\n",
    "]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "chart=viz.geolines(data=data,address_key='name',value_key='value',names=['北京', '上海', '广州'],max_symbolsize=15,min_symbolsize=15,symbol='plane',selected_mode='muliple')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "a7c472fb0c494174b50b27b61ce7c17b",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "MapView(basemap={'url': 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', 'max_zoom': 19, 'attribution': '…"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "chart"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
